package com.itheima.admin.feign;

import com.itheima.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * 书评服务Feign客户端
 * 
 * @author itheima
 */
@FeignClient(name = "review-service")
public interface ReviewClient {

    /**
     * 分页查询待审核书评列表
     */
    @GetMapping("/api/v1/review/pending")
    ResponseResult getPendingReviews(@RequestParam("page") Integer page,
                                     @RequestParam("size") Integer size);

    /**
     * 审核书评
     */
    @PutMapping("/api/v1/review/{id}/audit")
    ResponseResult auditReview(@PathVariable("id") Long id, @RequestBody Map<String, Object> params);
}

